import shell from "shelljs";
import path from "path";
import { setEnvironments } from "./setup";

shell.cd(path.join(__dirname, "..", "database"));

const envs = setEnvironments();

shell.echo("\nRemoving the containers and volumes...\n");
shell.exec(`${envs} docker-compose -p repchain-block-courier down`);
shell.exec("docker volume rm repchain-block-courier_mysql");
shell.echo("\nRemoved!\n");

shell.exec("yarn deploy");